module.exports = ({ types }) => {
  return {
    visitor: {
      CallExpression({ node }, { filename }) {
        if (node.callee.object.name === 'console' && node.callee.property.name === 'log') {
          const { line } = node.loc.start;
          node.arguments.unshift(types.stringLiteral(`(${filename}):(${line}):`));
        }
      }
    }
  }
}